CGM <in_graphics_file> <out_cgm_file> {scale} {CHARACTER | TEXT | BINARY}
    {image_resolution} {color_calibration_file}
 
converts an ARC/INFO graphics file into a Computer Graphics Metafile (CGM)
format.
 
arguments
 
<in_graphics_file> - the pathname of the ESRI graphics file to be
converted.
 
<out_cgm_file> - the disk file to be created that will contain the CGM file.
 
{scale} - optional scale factor used to scale the graphics file up or down.
The default scale factor is 1.0; the output dimensions will be the same as
specified in ARCPLOT when the <in_graphics_file> was created.  A scale of 0.5
will reduce the size by half in each dimension. A scale of 2.0 will increase
the size by a factor of two in each dimension.  Scale of 0 (automatic scaling
to fit the graphics file to the device size) is not supported by the CGM
command.
 
{CHARACTER | TEXT | BINARY} - specifies the type of encoding the <out_cgm_file>
will have.  There are three options.
 
CHARACTER - creates an ASCII-compressed CGM file that is suitable for systems
that have restricted storage capacity.  This file also provides optimized
transfer between computer systems.  This is the default.
 
TEXT - creates an uncompressed ASCII CGM file that can be easily read and
edited using any text editor.  This format, however, requires more storage
space and takes more processing time.
 
BINARY - creates a CGM file in binary format allowing more efficiency in the
generation and processing of <out_cgm_file>. However, it may not be easily
transportable between heterogeneous computers due to binary representation
differences between machines.
 
{image_resolution} - the resolution in dots per inch (dpi) at which raster
data contained in the <in_graphics_file> will be plotted.  The default value
is the maximum resolution the device can handle as long as it does not
exceed the resolution at which the data in the <in_graphics_file> was
captured.  If the device's resolution exceeds that of the graphics file,
then the latter will be used as the default.  Graphics files are captured
in ARCPLOT at 500 dpi by default (see DISPLAY in the ARCPLOT Command
References).  Specifying {image_resolution} will not affect the resolution
of vector data.
 
The actual resolution at which raster data is plotted can be calculated with
the following formula:
 
       resolution = device_resolution / n
 
where,
       n = device_resolution / {image_resolution}
 
and is rounded down to the nearest whole number.
 
{color_calibration_file} - specifies the pathname of the file that will be used
to calibrate the colors in the <in_graphics_file> to the output device at the
time of plotting.  A {color_calibration_file} must be specified for every
conversion if such calibration is desired.  A template calibration,
calibrate.dat, has been provided under $ARCHOME/plotters.  The
{color_calibration_file} is an ASCII file created with a text editor and has
the following format.
 
   CYAN                                     # Comment
   plot_percentage     chart_percentage     # Comment
   ...                 ...                  # Comment
   plot_percentage     chart_percentage     # Comment
 
   MAGENTA                                  # Comment
   plot_percentage     chart_percentage     # Comment
   ...                 ...                  # Comment
   plot_percentage     chart_percentage     # Comment
 
   YELLOW                                   # Comment
   plot_percentage     chart_percentage     # Comment
   ...                 ...                  # Comment
   plot_percentage     chart_percentage     # Comment
 
   BLACK                                    # Comment
   plot_percentage     chart_percentage     # Comment
   ...                 ...                  # Comment
   plot_percentage     chart_percentage     # Comment
 
The plot_percentage and char_percentage values are obtained as follows:
 
1) Plot $ARCHOME:[plotters]calibrate.gra
 
2) Do a visual comparison between the plot and the calibration chart provided
in the ARC/INFO Device Interface Guide.
 
3) If differences are noted between any strips, select a shade in your plot
that closely matches a shade in the chart.  Enter the pair of percentages in
the calibration file.  Repeat as needed for each strip.
 
The following example corrects all four colors (note that color name
abbreviations and comments are optional):
 
   C               # Under saturation
   0   0
   90  100         # Make upper end darker
 
   M               # Over saturation
   0   0
   100 80          # Make upper end lighter
 
   Y               # Early saturation
   10  20          # Make bottom end darker
   80  60          # Make upper end lighter
 
   K               # Over saturation
   0   0
   90  75          # Make upper end lighter
 
Color calibration is performed as a linear stretch; thus you only need two
pairs of values for any one color.  If only one par is given, colors below
the given values will be stretched between 0,0 and the given pair, and colors
above will be stretched between the given pair and 100,100.  If either 0 or
100 is one of the values of any pair, then that pair will become the limiting
extreme.
 
 
notes
 
The <out_cgm_file> cannot be read back into ARC/INFO.
 
Do not set {scale} to 0, this scale factor is not supported by the CGM
command.
 
CGM has been coded to output 32 bit integer data to go beyond the 80-inch
page size limitation imposed by 16 bit integer data.  This may cause errors
with some products that are not able to read 32 bit integer data.  Such
errors may be avoided if CHARACTER encoding is used.
 
A significant reduction of file size and plot generation time can be achieved
by reducing the resolution of raster data.  The resolution of raster data may
be halved without any significant degradation of the resulting plot.
 
Specifying {image_resolution} does not affect the resolution of vector data.
 
Using a {color_calibration_file} may be useful for solving the problem of plots
that are `too light' or `too dark'.  Problems related to primary colors of a
different hue may require recalibration od the device itself (check your
device's operating instructions).
 
Regeneration of a {color_calibration_file} is recommended when changes occur in
humidity, chemical mixture of inks, media type, and so on.
 
CGM is an AML in the default ARC ATOOL directory.
 
discussion
 
The CGM command converts an ARC/INFO graphics file into a Computers
Graphics Metafile (CGM) format.  The CGM format is ANSI and ISO approved, and
it is used for graphics exchange since it can be easily ported between computer
graphics devices and installations.
 
references
 
American National Standard - computer graphics metafile for the storage and
transfer of picture description information, ANSI X3.122-1986, New York:
American National Standards Institute, Inc., 1986.
 
The Computer Graphics Metafile, Henderson, L. R., and A. M. Mumford, London:
Hartnolls Ltd, 1990.
